package com.mastercard.labs

class Budget {
	public static enum Type {INDIVIDUAL('Specific Card'), ALL('Overall')
		final String value
		String toString(){value}
		Type(String value){this.value = value}
		String getKey(){ name() }
	}
	
	public static enum BudgetType {WEEKLY ('Weekly'), MONTHLY('Monthly'), CUSTOMIZE ('Customize')
		final String value
		String toString(){value}
		BudgetType(String value){this.value = value}
		String getKey() { name() }
	}
    static constraints = {
		type nullable: false, blank: false
		budgetType nullable: false, blank: false
		user nullable:false, blank: false
		amount nullable: false, range:1..100000000
		billDate range:1..31
    }
	
	boolean budget = true
	String remarks
	User user
	Date startDate
	Date endDate
	double amount
	int billDate = 1
	boolean smsNotification
	boolean emailNotification
	Card card // Budget for specific card
	Type type // Can be INDIVIDUAL/ALL
	BudgetType budgetType
	boolean recursive
	boolean deleted
}
